package com.cmx.controller;

import com.cmx.model.Student;
import com.cmx.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by cmx on 2017/5/12.
 */
@RestController
@RequestMapping(value = "/student")
public class StudentController extends BaseController {

    @Autowired private StudentService studentService;

    @RequestMapping(value = "/get_student")
    public ResponseEntity getStudent(Integer sid){
        Student student = studentService.selectStudent(sid);
        return new ResponseEntity(student, HttpStatus.OK);
    }
}
